package com.gxsf.wechatbook.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @author BeijiRonin
 * @version 1.0.0
 * @date 2021/1/18 17:56
 */
@Data
@Entity
/**
 * 专业
 */
@ApiModel("专业")
public class College {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public long id;
    /**
     * 专业名称
     */
    @ApiModelProperty("专业名名称")
    public String collegeName;
    @CreatedDate
    public Timestamp createTime;
    @LastModifiedBy
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Timestamp updateTime = new Timestamp(System.currentTimeMillis());
}
